class Solution:
    def findMin(self, nums: List[int]) -> int:
        ret=nums[0]
        def bisearch(left,right):
            nonlocal ret
            mid=(left+right)//2
            if left>=right:
                ret=min(nums[right],ret)
                return 
            if nums[mid]==nums[left] and nums[mid]==nums[right]:
                bisearch(left,mid-1)
                bisearch(mid+1,right) 
            elif nums[mid]>=nums[left] and nums[mid]>=nums[right]:
                ret=min(nums[left],ret)
                bisearch(mid+1,right)
            elif nums[mid]<=nums[left] and nums[mid]<=nums[right]:
                ret=min(nums[mid],ret)
                bisearch(left,mid-1)
            else:
                ret=min(nums[left],ret)
            return 
        bisearch(0,len(nums)-1)  
        return ret    

# 执行用时：
# 40 ms
# , 在所有 Python3 提交中击败了
# 69.14%
# 的用户
# 内存消耗：
# 15.4 MB
# , 在所有 Python3 提交中击败了
# 9.10%
# 的用户